﻿using Ross.OA.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ross.OA.EntityFramework.Model
{
    [Table("POPlans")]
    public class POPlans : Entity<Guid>, IHasCreationTime
    {
        /// <summary>
        /// 爱玛分公司编码
        /// </summary>
        [Required, MaxLength(50)]
        public string company_code { get; set; }

        /// <summary>
        /// 爱玛分公司名称
        /// </summary>
        [MaxLength(50)]
        public string company_name { get; set; }

        /// <summary>
        /// 爱玛工厂编码
        /// </summary>
        [MaxLength(50)]
        public string factory_code { get; set; }

        /// <summary>
        /// 爱玛工厂名称
        /// </summary>
        [MaxLength(50)]
        public string factory_name { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        [MaxLength(50)]
        public string supplier_code { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [MaxLength(50)]
        public string supplier_name { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        [Required, MaxLength(50)]
        public string fits_code { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [Required, MaxLength(200)]
        public string fits_name { get; set; }

        /// <summary>
        /// 计划版本
        /// </summary>
        public string plan_version { get; set; }

        /// <summary>
        /// 计划月份
        /// </summary>
        public DateTime plan_month { get; set; }

        /// <summary>
        /// 计划采购数量
        /// </summary>
        public int plan_num { get; set; }

        /// <summary>
        /// 与上一版本差异
        /// </summary>
        public int diff_prev_num { get; set; }

        /// <summary>
        /// 与第一版本差异
        /// </summary>
        public int diff_first_num { get; set; }

        /// <summary>
        /// 采购组代码
        /// </summary>
        [MaxLength(50)]
        public string purchase_gcode { get; set; }

        /// <summary>
        /// 采购组名称
        /// </summary>
        [MaxLength(50)]
        public string purchase_gname { get; set; }

        /// <summary>
        /// 交货截止日期
        /// </summary>
        public DateTime delivery_date { get; set; }

        /// <summary>
        /// 采购单位
        /// </summary>
        [MaxLength(50)]
        public string unit_code { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [MaxLength(50)]
        public string batch_serial { get; set; }

        /// <summary>
        /// 批次管理
        /// </summary>
        [MaxLength(50)]
        public string batch_status { get; set; }

        /// <summary>
        /// 初始版本 (107910100:是，107910200:否)
        /// </summary>
        public int first_version { get; set; }

        /// <summary>
        /// 初始版本名称
        /// </summary>
        [MaxLength(50)]
        public string first_version_name { get; set; }
        /// <summary>
        /// 处理状态，0=未处理，1=接收，2=已拒绝
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime? DealTime { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
    }
}
